import request from '@/utils/request'

// 查询流程管理-计量流程节点列表
export function listNode(query) {
  return request({
    url: '/workflow/node/list',
    method: 'get',
    params: query
  })
}

// 查询流程管理-计量流程节点详细
export function getNode(workflowNodeUuid) {
  return request({
    url: '/workflow/node/' + workflowNodeUuid,
    method: 'get'
  })
}

// 新增流程管理-计量流程节点
export function addNode(data) {
  return request({
    url: '/workflow/node',
    method: 'post',
    data: data
  })
}

// 修改流程管理-计量流程节点
export function updateNode(data) {
  return request({
    url: '/workflow/node',
    method: 'put',
    data: data
  })
}

// 删除流程管理-计量流程节点
export function delNode(workflowNodeUuid) {
  return request({
    url: '/workflow/node/' + workflowNodeUuid,
    method: 'delete'
  })
}

// 查询流程节点用户 已分配和未分配
export function getWorkflowUserList(data) {
  return request({
    url: '/workflow/node/getWorkflowUserList',
    method: 'post',
    params: data
  })
}

// 保存流程节点用户
export function saveWorkflowNodeUser(data) {
  return request({
    url: '/workflow/node/saveWorkflowNodeUser',
    method: 'post',
    params: data
  })
}
